/*
 * HomeGoodsAdapter.java
 * business
 *
 * Created by ChenTao on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.adapter;

import android.content.Context;

import com.yidiandao.business.ui.widget.listview.CommonAdapter;
import com.yidiandao.business.ui.widget.listview.DisplayItemManager;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeDecorateImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeFlashSaleListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeFreeListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeGoodsListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeHotTitleListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeMenuListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeNoticeListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeOneBigImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeOneOneTwoImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeOneSmallImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeOneThreeImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeOneTwoImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeOneTwoOneListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeOneTwoThreeImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeSecondKillListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeServiceListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeThreeImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeThreeOneImageListItem;
import com.yidiandao.business.ui.widget.listview.displaylistitem.HomeTwoImageListItem;

/** 首页的Adapter */
public class HomeAdapter extends CommonAdapter<DisplayListItem> {

    public HomeAdapter(Context context) {
        super(context);
    }

    @Override
    protected void registerDisplayListItemMap() {

        // 老的类型
        DisplayItemManager.register(getAdapterTag(), HomeMenuListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeGoodsListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeHotTitleListItem.class);

        // 最新类型
        DisplayItemManager.register(getAdapterTag(), HomeDecorateImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeNoticeListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeServiceListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeFreeListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeFlashSaleListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeSecondKillListItem.class);

        // 图片模块
        DisplayItemManager.register(getAdapterTag(), HomeOneBigImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeOneSmallImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeOneOneTwoImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeOneTwoThreeImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeThreeImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeOneTwoImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeTwoImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeOneThreeImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeThreeOneImageListItem.class);
        DisplayItemManager.register(getAdapterTag(), HomeOneTwoOneListItem.class);
    }

    @Override
    protected String getAdapterTag() {
        return HomeAdapter.class.getSimpleName();
    }
}
